package com.wg.dome.repository;


import com.wg.dome.attribute.Attribute;
import com.wg.dome.attribute.AttributeType;
import com.wg.dome.entity.config.ZhuLingRingEntity;
import com.wg.db.cache.AbstractEntityRepository;

public class ZhuLingRingRepository extends AbstractEntityRepository<ZhuLingRingEntity> {
    public ZhuLingRingRepository() {
        super(ZhuLingRingEntity.class);
    }

    public void getAttribute(short zlLv, Attribute attribute){
        ZhuLingRingEntity entity = get(zlLv);
        if (entity == null){
            return;
        }

        attribute.set(AttributeType.HP, entity.getHp());
        attribute.set(AttributeType.DEX, entity.getDex());
    }



    public ZhuLingRingEntity getNextEntity(short zlLv){
        return get(zlLv + 1);
    }
}
